package com.lz.androidlibraries.activity;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import com.liuyk.commonlib.activity.BaseActivity;
import com.liuyk.commonlib.widget.contain.HomeContainerView;
import com.lz.androidlibraries.R;
import com.lz.androidlibraries.fragment.MainFragment;
import com.lz.androidlibraries.fragment.OtherFragment;

import java.util.ArrayList;

public class MainActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentLayout(R.layout.activity_main);
        setTopBarTitle(getString(R.string.app_name));
        setLeftIcon(-1);
        statusBarLight(R.color.white);

        HomeContainerView containerView = findViewById(R.id.home_container);
        containerView.setScrollEnable(false);
        ArrayList<Fragment> fragments = new ArrayList<>();
        fragments.add(new MainFragment());
        fragments.add(new OtherFragment());
        fragments.add(new Fragment());
        containerView.init(getSupportFragmentManager(), fragments, "home_tabbar");

    }

    @Override
    protected boolean isShowToolBar() {
        return true;
    }
}
